package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
 /**
 * 系统授权表
 *
 * @author sasazaixian
 * @Date 2018-10-09 13:30
 * @TableField(exist = false) 实现属性与数据库字段不一一对应
 */
 @Data
 @EqualsAndHashCode(callSuper=true)
 @TableName("sys_privilege")
public class SysPrivilege extends Model<SysPrivilege> {
    private static final long serialVersionUID = 1L;
    
    //扩展能查询字段
    @TableField(exist = false)
    private String key ;
    //开始日期
    @TableField(exist = false)     
    private String sdate;
    //截止日期 
    @TableField(exist = false) 
	private String edate;
    //排序字段
    @TableField(exist = false) 
	private String  sortField ;
	//排序	
	@TableField(exist = false) 
	private String sortOrder;

	@TableId(value = "sp_id", type = IdType.AUTO)
    private Integer spId;     //编号


    @TableField("sp_function_id")
    @ApiModelProperty(value = "功能编号")
    private Integer spFunctionId;     //功能编号

    @ApiModelProperty(value = "类型编号")
    @TableField("sp_type_id")
    private String spTypeId;     //类型编号

    @ApiModelProperty(value = "4:职务:3,角色;2:岗位;1:部门或机构;9:机构分类角色")
    @TableField("sp_type")
    private Integer spType;     //4:职务:3,角色;2:岗位;1:部门或机构;9:机构分类角色

    @ApiModelProperty(value = "操作权限")
    @TableField("sp_method")
    private String spMethod;     //操作权限

    @ApiModelProperty(value = "所属机构")
    @TableField("so_id")
    private Integer soId;     //所属机构
	
	@Override
	protected Serializable pkVal() {
		return this.spId;
	}


}
